package com.ruoyi.interviews.mapper;

import java.util.List;
import com.ruoyi.interviews.domain.Interviews;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 面试记录Mapper接口
 *
 * @author ruoyi
 * @date 2024-11-10
 */
@Mapper
public interface InterviewsMapper
{
    /**
     * 查询面试记录
     *
     * @param interviewId 面试记录主键
     * @return 面试记录
     */
    public Interviews selectInterviewsByInterviewId(Long interviewId);

    /**
     * 查询面试记录列表
     *
     * @param interviews 面试记录
     * @return 面试记录集合
     */
    public List<Interviews> selectInterviewsList(Interviews interviews);

    /**
     * 新增面试记录
     *
     * @param interviews 面试记录
     * @return 结果
     */
    public int insertInterviews(Interviews interviews);

    /**
     * 修改面试记录
     *
     * @param interviews 面试记录
     * @return 结果
     */
    public int updateInterviews(Interviews interviews);

    /**
     * 删除面试记录
     *
     * @param interviewId 面试记录主键
     * @return 结果
     */
    public int deleteInterviewsByInterviewId(Long interviewId);

    /**
     * 批量删除面试记录
     *
     * @param interviewIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInterviewsByInterviewIds(Long[] interviewIds);

    List getRoleId(Long userId);

    public List<Interviews> selectInterviewsByUserId(Long userId);

    public List<Interviews> selectInterviewsByRoleId(Long userId);

    /**
     * 查询超过30天的
     */
    public List<Interviews> selectday();
    public int deleteAll();

    @Select("select user_name from sys_user where user_id=(select user_id from applications where id=#{application_id})")
    public String getUsername(Long application_id);

    List<Interviews> selectInterviewsByCompany(Long user_id);
}
